package com.itheima.io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

/**
 * @author Anomaly
 * @date 2023/2/9 15:23
 */
public class FileInputStreamDemo2 {
    public static void main(String[] args) throws IOException {
        InputStream is = new FileInputStream("file-io/src/test.txt");
        byte[] buffer1 = new byte[3];
        byte[] buffer2 = new byte[3];
        byte[] buffer3 = new byte[3];

        System.out.println(is.read(buffer1));
        System.out.println(Arrays.toString(buffer1));
        System.out.println(is.read(buffer2));
        System.out.println(Arrays.toString(buffer2));
        System.out.println(is.read(buffer3));
        System.out.println(Arrays.toString(buffer3));

    }
}
